Add optional on_run callback, to run on loop start