Replaced directive sendFile with prepareFile. Fixes issue.