fixed debugging/error text generation & printing issues