handle case when a file has no extension