Bug fix: Premature end of receive() on multiple files