Wait for pidfile instead of sleeping
Pidfile => lib/