Added saveImage method