ftruncate added
removed old ftruncate