clean log and some code format