Timeout & PID code