added _createFileEntity method
updates based on code review