Improved

Converted tabs to spaces, added missing semicolons

Reading only chunk of file to avoid browser freezing. Separate function that takes a file and a callback if you want to use plugin with drag & drop etc. (don't have file input)