Add error reporting and use strict for sketch code