hold_lock_file_for_append(): release lock on errors