Add codes to output log