Updated samples and added debug messages