added some basic error checking to excel sheet