Committing example of takeScreenShot() that causes runtime exception