Moved EXIT code from core.php (just my todo)