writing messages to error container