modified create_file