write pid file for every executable