slight change of method saveFile() in class Storage