improve rasterize script, fix import script