Fixed issue with output not writing all tests