open file for reading only if hflag == 0