Check return code of truncate in decoder (fix warning)