update mapfile on the fly