Improvement on template selection for feature
Fix for failing file upload