Moved sendFile to res