Added WarnHandler to re-emit warnings at the end of the run