Ok, so I made a program that has a log in and password, blah blah. I know how to make it write to files, so if someone logs in, it will enter a date, and save it to a file. If they log out, it will enter that time in the file too. But how can I keep track if someone just hits the Escape Button, and exits the program? Is there a way to somehow catch if someone exits a program??