read file constructor in Entity