changed the way debug prints resources