Clean up before upload