unless (defined $LOG) { open $LOG, "file"; ... }