bugfix: saveAs option now creates files. Previously opened files in r mode