few error handling updates