can get the desired values printed to file using 1 file