Improving dummy_camera and test with debug messages and error checking.