Fix take screenshot on fail