take screenshot when application close fails after timeout