Refs #17. Add error handling for log file writing.