catch the error if we try to close too soon