Unlink logs when necessary