use ensure and debug mode