cleaning up switches in set_write_flag