Adding exception handling to add puts as extra lines if they can't be handled for backward compatiability