flushCache only makes sense on RWDatasets and better error reporting
exposed GDALReprojectImage