disconnect from db before (and during) main fastq processing loop
disconnect from db before calling the potentially time-consuming num_lines or num_records