There is a bug in the Applayer, which causes filecorruption when sending a file over ~16 kB. Don't know where it is.
Fixed bug causing corrution of the file. Please remember to check bufferstatus before pushing and poping from it!