Pipe errors to file. Bug fixes.