Update zimcheck.cpp

Bug fixes and some updates