Camera Help!

Hey Corona users! Would anyone mind telling me what is wrong with my code? I want my application to take pictures and for it to be able to save to the phone, thanks!

-- Camera Function local sessionComplete = function(event)         local image = event.target     print( "Camera ", ( image and "returned an image" ) or "session was cancelled" )     print( "event name: " .. event.name )     print( "target: " .. tostring( image ) )     if image then         -- center image on screen         image.x = display.contentWidth/2         image.y = display.contentHeight/2         local w = image.width         local h = image.height         print( "w,h = ".. w .."," .. h )     end     media.capturePhoto( {          media.Camera, sessionComplete,             destination = {             baseDir = system.TemporaryDirectory,             filename = "myImage.jpg",             type = "image"         }     } ) end