added quiet logging and a more graceful exit