remove unneeded exit and added debug log