Replaced open_direct_file with open_file, which takes a flag about whether to use direct I/O.