fix methods for update and delete
added logger, added error handler for controllers