Error handling and removal of old exports.