Additional Error Handling

Changed port number and added error handling for strange case.