Add some comments and log outputs.