Added validation for first four parameters of MPCWriter.write_line 
along with a custom formatting exception class.