Added logging and added support for valgrind strategy.