Remove testing lines, fix writing to dump