fix bug if sendfile on. gracefully