added debug to stdout