little more update in error handling