added some error checking for chainevent in case of missing/broken files