Fix missing 'then' and add log_line_prefix.