add support to dump flash and upload it back