Added quality check and reads in config file