update.php with error reporting