fix put_file bug