Added multiple threads into a file