add simple dump to file functionality