Added file-flag to createFile call, fixing getFileStatus for directories