print out listening port
added error handling
added error handling and checking
changed socket config