refactor(filepicker) saveFile