Added fileWriter method.