Debug printouts
Added fix for "end of file reached"
Removed update_config