check eof only on fifo files. restored original logic of checking bytes read against file length. mongorestore requires both --db and --collection when using stdin/fifo