add date to filename string;
removed redundant code;