switching to use the pidfile for cleanup if enabled and the file exists