Minor modifications
Add a function to dofile resource files.