Added query to fetch the danglings bugs, and save them. Still need to work on chunkifying the output file.