[powerdebug 21/35] improve function to read the file