Fix newline character
Add method to print the current PID state (for debug use)