added printing errors at the end of the list