fix on limitrows: being -1 means file is truncated