baseadaptivesink: fix list iteration
baseadaptivesink: remove the temp file after an error