Made take picture feature now more failsafe
Further improvements of camera.js