limited log output to 1000 lines to avoid hanging