Fix for errors happening during sendfile operations