Getting an error while running export script