Added error description for loading xml.
Fixed error with writing to opened log file.