fix bugs in TestMongoDB.java and Log.java