Write error message in same way as below