Fixed GDALOpen call parameter and added an error check for GDALContourGenerate call