check return of asprintf