Lookup resource folder only once and add some debug output.
Enable debug output for resource folder lookup.