error in determining when chunk too large