Using pid file to kill process

This was removed in previuse version, and was used on all older version,
so now back again with pid file