bug fix and adding logging to list