Fixed incorrect buffer size of transferred files