Added a logger level for better logging
Retrieve port number correctly

Casting the string directly as an int was very silly. atoi() is now used
to correctly retrieve the port number from the argument array