fix: log after test exit in TestAgent/StartupScript
#1726
Merged
TestAgent/StartupScript
#1726