Refs #95. Fixed a typo. Pass the mode into the open function