Added code to take screenshots