updated argmax
use close() instead of shutdown(RDWD)

See http://stackoverflow.com/questions/4160347/close-vs-shutdown-socket
Avoid warning: unused variable 'PRINT_DEBUG_INFO' [-Wunused-const-variable]