Do not crash if connection is closed while sending a file using sendfile

file:sendfile/2 might fail by throwing a {badmatch, {error, enotfound}}
this is because its internal implementation fails with a badmatch in
prim_file:sendfile/10 if the socket is not connected. This should be
fixed upstream, but as a workaround we catch the error instead of
crashing.