Made the utils.exists() function more robust and added tests.
Removed some debug noise.