fix missing pid file and names of subs.