Added error handling to static template analyser if the user has the file open during save.
Fixed bug in static template analyser where analysis was kicked off multiple times if analysis run more than once.