was wrong about set_input_file, and some other changes to be correct