add finish() when camera is not available, delete unused piece of code