Fixes related to opening a file.