write date to files