Changed script to work with >1 core/log per server