Added the feature to add q values in a text file.