handle nonexistent pid file in --status
add restart count tracking, fix --on-error behaviour