changes on uart for better error logging