Added support for exporting a pkl file