Set buffer length if it differs from result of reading file
Move till after error case
Merge pull request #1 from mobileiq/feature/update-buffer-length

Set buffer length if it differs from result of reading file