Added flag for #1, so it's tunable. Also added more try/catch so that callbacks that output errors are more useful.