use byte string when writing to pid file