Added npid module to handle management of pid file