Adds some error handling