Call release_input_file only if not NULL