almost there. file writer