createfile: file size error fixed, writepiece: errors found see comments. peerwire: now downloads the last piece with custom size.