moved reporting to try clause of try/except/else block
fixed unit tests