Adding some error checking
Formatting and coloring done. It looks good.