improved sendfile management