fixed process reader hopefully, not echo variable at end of script, couldn't easily get enviro variables