Added memory leaks check