add test for dateFile and fix bug