Added function calls for writing to log files as well as running crit tests first before normal tst files.