mutex lock the file error vector

And adding trailling ending carriage return