Adding flag to switch between xml and binary formats