Added logging class and fixed bug that leads to blank screen on some cards.