Changed input stream buffer to only 1Kb to improve performance for small files.