Add locking for camera