better error logging
add missing template