Use function is_running instead of check on pid file