Separated shot detection from the webcam refresh loop so that they can be configured independently. Shot detection should be slower than the refresh rate.
Fixed a bug where the logger's level was not set correctly and added a debug mode so that debugging messages can now optionally be printed