Merge "Fix wrong log messages and format the code"