updated to allow resource files as well as folders