Code check in for err file generation

Error file generation and arguments parsing