Creating csv and fixed rotation glitch