yeah, this is a bit of a code smell to me.

we're doing a little bit of a dance here as the formatter is returning different types of values (bool/string). we're also outputting in different ways depending on the result of the formatter (`puts` vs. a debug log statement). in general, the formatter should handle formatting the output and not worry about validation logic.

i would pull the `name_exists?` method out of the formatter and add it to this class. i would also probably rename it to be more clear about what it's checking (for example `name_exists_in_catalog?` or `catalog_includes_name?`, etc.). i would then add a call to the `all` method of this class to leverage the newly refactored method and log if needed. if the name does not exist in the catalog, then the existing `get_heirloom_info` method would not be called.

the current `get_heirloom_info` method would then essentially be a wrapper method which delegates to the formatter and outputs the result.

does all of that make sense?

let's give it a shot and see what it looks like.