made stdin reader more robust