Added code to check if can open camera or not.
Added check if camera can be opened or not.
For Valay.