Fix cleanup thread, preventing application from exit
Fixed upper range of the query to be inclusive as OAI-PMH standard requires.
Added debug flag for detailed logging.