Moved error/warning code to config.php