Fix return value, use truncate to create the file
Testing receive of partial and file