added condition to force single thread if the file size is very small. Its faster that way!
fixed a typo