to_str/1 now returns {ok, Str} instead of just Str