fix bug introduced by input_file flag