added csv output to PIDplot