Extra database logging and message registration cleanup