enable memory check in debug mode