* [templates]: check return value of dlinit()