ensure only core msg properties are saved

add some tests for mongo handler also