debugging take a photo, console.log added