fixed dump to file