Implemented obtaining messages from a file