optional pid file creation