Fixed bug in file management, added messagecontroller