- Reverted hal-open function because files were not being opened in proper modes.