Changed check in ftruncate to check if 0, not <= BLOCKSIZE