catches keyboard interrupt on server and quits gracefully