Wrote worker and master file reading methods