Added export g-code logic