only log when ok