Added a debug command which writes a summary of details about all active threads to a text file