Improved exception handling in case there is no webcam connected.