Enhanced to save photos in the project directory.