Added error reporting on index.php