replaced sendfile with sendFile