last_file fix