fixing DQM, corrupted files and multithreading issues