Removed redundant code from sendFile