added more log messages
Fixed the bug, which caused a message corruption if the previous message had no attahcment.
Cleaning in dds-agent.