added -s synchronous option to use O_DIRECT
truncate file after last chunk instead of first