Updated reader class to pass file to writer when its built so the class can successfully write to file