remove redundant c_str -> string -> c_str conversions