made logger read_data() more pythonic