Fixed problem with file open using only 2 parameters when creating new file
(added mode to open command in 3rd argument).