pidfile works correctly now