adding deny callback
adding error handling
clearing errors upon template render