adding error logger