error check and better output without colors