wrapper utilities. now writing content on the wrapper
fallback to console.log
improve error handling
add wrapper and template element