- Added pidfile handling