Added function to remove error mesasge from index.php