set keepalive option after all command line parameters have been processed