Index: benchmark/io/http/worker.cfa
===================================================================
--- benchmark/io/http/worker.cfa	(revision 3f95dab13f46929be6718df860c0fada67fb412c)
+++ benchmark/io/http/worker.cfa	(revision 32d13834026c45a070b8ffbeecf6d71de04dd54a)
@@ -14,5 +14,5 @@
 #include "filecache.hfa"
 
-static const unsigned long long period = 50_000_000;
+static const unsigned long long period = 5_000_000;
 
 //=============================================================================================
@@ -33,33 +33,36 @@
 
 		// if we are done, break out of the loop
-		if( closed ) break REQUEST;
+		if( closed ) {
+			if( code != OK200 ) this.stats.sendfile.error++;
+			break REQUEST;
+		}
 
 		// If this wasn't a request retrun 400
 		if( code != OK200 ) {
-			sout | "=== Invalid Request :" | code_val(code) | "===";
-			answer_error(fd, code);
-			continue REQUEST;
-		}
-
-		if(0 == strncmp(file, "plaintext", min(name_size, sizeof("plaintext") ))) {
-			if( options.log ) mutex(sout) sout | "=== Request for /plaintext ===";
-
-			int ret = answer_plaintext(fd);
-			if( ret == -ECONNRESET ) break REQUEST;
-
-			if( options.log ) mutex(sout) sout | "=== Answer sent ===";
-			continue REQUEST;
-		}
-
-		if(0 == strncmp(file, "ping", min(name_size, sizeof("ping") ))) {
-			if( options.log ) mutex(sout) sout | "=== Request for /ping ===";
-
-			// Send the header
-			int ret = answer_empty(fd);
-			if( ret == -ECONNRESET ) break REQUEST;
-
-			if( options.log ) mutex(sout) sout | "=== Answer sent ===";
-			continue REQUEST;
-		}
+			abort | "=== Invalid Request :" | code_val(code) | "===";
+			// answer_error(fd, code);
+			// continue REQUEST;
+		}
+
+		// if(0 == strncmp(file, "plaintext", min(name_size, sizeof("plaintext") ))) {
+		// 	if( options.log ) mutex(sout) sout | "=== Request for /plaintext ===";
+
+		// 	int ret = answer_plaintext(fd);
+		// 	if( ret == -ECONNRESET ) { this.stats.sendfile.error++; break REQUEST; }
+
+		// 	if( options.log ) mutex(sout) sout | "=== Answer sent ===";
+		// 	continue REQUEST;
+		// }
+
+		// if(0 == strncmp(file, "ping", min(name_size, sizeof("ping") ))) {
+		// 	if( options.log ) mutex(sout) sout | "=== Request for /ping ===";
+
+		// 	// Send the header
+		// 	int ret = answer_empty(fd);
+		// 	if( ret == -ECONNRESET ) { this.stats.sendfile.error++; break REQUEST; }
+
+		// 	if( options.log ) mutex(sout) sout | "=== Answer sent ===";
+		// 	continue REQUEST;
+		// }
 
 		if( options.log ) {
@@ -70,11 +73,12 @@
 
 		if( !options.file_cache.path ) {
-			if( options.log ) {
-				sout | "=== File Not Found (" | nonl;
-				write(sout, file, name_size);
-				sout | ") ===";
-			}
-			answer_error(fd, E405);
-			continue REQUEST;
+			// if( options.log ) {
+				serr | "=== File Not Found (" | nonl;
+				write(serr, file, name_size);
+				serr | ") ===";
+				abort();
+			// }
+			// answer_error(fd, E405);
+			// continue REQUEST;
 		}
 
@@ -86,11 +90,12 @@
 		// If we can't find the file, return 404
 		if( ans_fd < 0 ) {
-			if( options.log ) {
-				sout | "=== File Not Found (" | nonl;
-				write(sout, file, name_size);
-				sout | ") ===";
-			}
-			answer_error(fd, E404);
-			continue REQUEST;
+			// if( options.log ) {
+				serr | "=== File Not Found 2 (" | nonl;
+				write(serr, file, name_size);
+				serr | ") ===";
+				abort();
+			// }
+			// answer_error(fd, E404);
+			// continue REQUEST;
 		}
 
@@ -98,8 +103,9 @@
 		int ret = answer_sendfile( this.pipe, fd, ans_fd, count, this.stats.sendfile );
 		if(ret < 0) {
-			if( ret == -ECONNABORTED ) break REQUEST;
-			if( ret == -ECONNRESET ) break REQUEST;
-			if( ret == -EPIPE ) break REQUEST;
-			abort( "sendfile error: %d (%d) %s\n", ret, (int)errno, strerror(errno) );
+			if( ret == -ECONNABORTED ) { this.stats.sendfile.error++; break REQUEST; }
+			if( ret == -ECONNRESET ) { this.stats.sendfile.error++; break REQUEST; }
+			if( ret == -EPIPE ) { this.stats.sendfile.error++; break REQUEST; }
+			if( ret == -EBADF ) { this.stats.sendfile.error++; break REQUEST; }
+			abort( "answer sendfile error: %d (%d) %s\n", ret, (int)errno, strerror(errno) );
 		}
 
@@ -107,13 +113,15 @@
 	}
 
+	this.stats.sendfile.close++;
+
 	if (stats_thrd) {
-		unsigned long long next = rdtscl();
-		if(next > (last + period)) {
+		// unsigned long long next = rdtscl();
+		// if(next > (last + period)) {
 			if(try_lock(stats_thrd->stats.lock __cfaabi_dbg_ctx2)) {
 				push(this.stats.sendfile, stats_thrd->stats.send);
 				unlock(stats_thrd->stats.lock);
-				last = next;
-			}
-		}
+				// last = next;
+			}
+		// }
 	}
 }
@@ -144,4 +152,10 @@
 		if(this.done) break;
 
+		this.stats.accepts++;
+		if (stats_thrd && try_lock(stats_thrd->stats.lock)) {
+			push(this.stats, stats_thrd->stats.accpt);
+			unlock(stats_thrd->stats.lock);
+		}
+
 		if( options.log ) mutex(sout) sout | "=== New connection" | fd | "" | ", waiting for requests ===";
 		size_t len = options.socket.buflen;
@@ -149,5 +163,4 @@
 		handle_connection( this.conn, fd, buffer, len, 0p, last );
 		this.conn.stats.sendfile.maxfd = max(this.conn.stats.sendfile.maxfd, fd);
-		this.conn.stats.sendfile.close++;
 
 		if( options.log ) mutex(sout) sout | "=== Connection closed ===";
@@ -172,4 +185,5 @@
 	/* paranoid */ assert( this.conn.pipe[1] != -1 );
 	this.conn.stats.sendfile.maxfd = max(this.conn.pipe[0], this.conn.pipe[1]);
+	// this.conn.stats.sendfile.maxfd = 0;
 	for() {
 		size_t len = options.socket.buflen;
@@ -220,4 +234,5 @@
 		p = pop(*this.queue);
 		if(p) break;
+		// abort( "Too few threads" );
 		yield();
 		this.stats.creates++;
@@ -288,12 +303,12 @@
 
 		if (stats_thrd) {
-			unsigned long long next = rdtscl();
-			if(next > (last + period)) {
+			// unsigned long long next = rdtscl();
+			// if(next > (last + period)) {
 				if(try_lock(stats_thrd->stats.lock)) {
 					push(this.stats, stats_thrd->stats.accpt);
 					unlock(stats_thrd->stats.lock);
-					last = next;
+					// last = next;
 				}
-			}
+			// }
 		}
 
