First Version to write a bytestream in a File