fixes jira issue 1603

added file ext name check as well as checking file for pre-existing file ext in the filename