Flag to choose whether to write a screenshot when an exception occurs