validate command-line options, starting/stopping heartbeat thread