fixed load_from_file to use a buffered reader and be compatible with save_to_file

fixed issues with last patch