mongoSaveHandler: added bad data tests which lead to some refactoring