Add isModified flag to EntityManager, and use of it in FileManager