added comment error handling