Make sure we do not close a file pointer that is already closed, in case of errors
Make sure we do not close a file pointer that is already closed, in case of errors

larsbrinkhoff/ostis,stefanberndtsson/ostis,nocrew/ostis,lokedhs/ostis,nocrew/ostis