Obtain PID from EPIC server

Fixed error handling