Add error reporting to index.php