change logger, added display of error