added saveScreenshot in Window class