Deleted openFile function, added FAIL after file opening failed