Code tweaks
dump to a file