Added possibility to load resources from a file