added default port constant and use of these constants in usage messages
added exception handling