Move common wait into startup script