safer read data from ps process