Fix shutdown
Fix gprof
remove debug output
Improve getBlockNodeIdMapping performance by factor 4 (major cpu hog due to gprof and callgrind)