fixed to remove white space, invalid date format, line index. added LastPositionHelper test.