Added the error checker