Fixing errors when calling close() after an error