Added saveToGallery parameter to captureScreen functions