added error handling when updating configuration.php