Fixed screenshot on error