Improved dealing with bad user input and improved logging system.