Add some error handling to lcd.js