fixed issue when saving files without extension