Some debug messages added.