Fixed on_new_file