Set buffer length if it differs from result of reading file