How to disable preview etc. when exporting