Doing print out and error checking