Adjust the relates_commit function, with debugging code and error handling