Fix file handle not getting closed.
Use ByteBuffer WIP