Fix error in create_remote_file and extend failure message.