added abort if close fails