Fixed startup script (PID permissions + tests)