I found the solution to this problem, i have a variable length header in my Input fixed length file which was not skipped, so the position was not exactly starting at the beginning of a record instead it was starting at position (StartofRecord - HeaderLength). This made each record to read a few characters(as much as the headerlength) from the previous record.
Updated Code:
if ((start % recordByteLength) > 0) {
pos = start - (start % recordByteLength) + recordByteLength + headerLength;
}
else {
pos = start;
}
fileIn.skip(pos);