unlink "debug.log" if $type eq 'w';