adding flags for each type of error