Moved from exceptions to messages
Fixed exception handling