add: error messages and logging