Sort out --write option to write resource lists