don't read a large file at once
refactor using jQuery Deferred