Add chunked support (disabled by default); add readfile option