print LOG "foo" or die "Unable to print: $!"; close LOG or die "Unable to close: $!";