fixed open_file (maybe)