rewrote an error and rewrote the code in the file checker