minor
use to_str instead of to_file for instance