Export spool file creation function