Added a checkedOpenFile method

The method essentially is a wrapper that checks for errors in opening a
file, returning a bool indicating success