Improve performance by reading only part of file
Remove unused variable