mode change when open a datafile