Added debug printout in the texture finding code