create pid file before dropping privs