there is missing unlink of append_data, otherwise tmp file can leak