change to remove pid file if run_once throws an exception