Added closing of file channel in non-memory mapped mode