Closes file, and simplifies object upload