Added check to cat main.php so we can see why it's failing