Auto remove \n in the end of logs