Change IO.read to File.read and guard against a nonexistent ahn pid