add an ```else {}``` block with error or debug log