open FH, ">$file" or error("msg"), return undef;