added pid file creation, but not implemented lockin