fixed to handle files in Resources directory appropriately.