sub log { open (LOG,">>log") || die $!; print LOG "$_[0]\n"; close LOG; }