Fixed auto-closing communicator and added exception handling