Better handling of callback for test done;