Added a graceful exit from the software