Little refactoring make all resources getfileordefault