dump to file now dumps all statevariables to the specified filename