Added sendFile support
Fixed deprecated function call