Added debug messages to console