Fixed minor oversight where the pid written could not be specified.
start of mon like module subclassing from Daemon