Taking a screenshot in case of timeout