Added try and catch to handle error connecting the server if offline.
Use a command connect or quit to start connect or exit program.