implemented a loop when an error occurs, to write a " " instead of a "," is possible now