I kinda prefer it here: then that code can simply deal with how to read/write text, and using code can decide where that text comes from/goes to. It's a clean separation of concerns.