added shutdown to datefile