Added some error checking and text coloring for better visibility