date handling improved; original filename can be kept