[AESH-30]
make sure to trim the buffer before its parsed
added newline to errormsgs