works perfectly for small files, but had a couple of "The parameter is incorrect" socket exceptions. Need to figure out what cause that.