Write ByteArray data to the destination File
data to write
the destination file
in case of IO operation problems