moved to use a function with parameter input
profFile.write(profile)