fingerpring: refacored code to print swirl file

remove 20 lines of code and made it more readable!!