Added some safe open and release camera procedures