Added some checks
Added ConfigError exceptions
Added missing import and LOG
Done with builtin facts