Handler for error during template ajax loading

There is error handler when you load template from file system, so i
added this to ajax method.