added method to add file extension when needed in filename for adding and exporting