implemented file.putStream and file.getStream