Returning the file does not make sense IMO. There is absolutely no reason to create a new File instance when writing it in the filesystem