Added a function to dump classcontents to file