changed settings callback to use better error reporting