fix #5: introduce TextFile classes