Finish readFile method