Fix unlink err

sometimes a child Stata hadn't released a lock on the log file even
though finito file has been written (could be a race condition).