removed logging apart from errors