sleep in main loop waiting for ctrl-c

allows the script to be run without stdin, and prevents it from shutting down immediately