Updated deprecated call to sendfile so it's using the up to date function sendFile