output document errors to log file instead of terminal