Simplify steps of read data from file