Added a debug log to saving screenshot