Added try catch blocks just in case
kept collectionLog as collectionLog as it will be easier to understand later (as we both get older)