added error-close and success-close