Fixed file truncation