Fixed issue of error while saving image from camera