add logging and fixed the duplicate banner bug