added home page error checking