Don't allocate so much crap on the stack, ifdef resource loading code for debug mode