Revert "Using byte channels instead of byte arrays to save files"

This reverts commit a04776416defc81b4bcac9c61995a21af07e769d.