sub write_new_file { my ( $fn, $str ) = @_;