Added proper debug messages