Print better error messages from File::read()
Make resource loading generic using templates