added some fool proof checks on load resources