add custom pid file support