safe_print can take a block