Shouldn't we have some safety around this close? If the decode craps out, won't the file be left open?