Add error log to files