1. -Improve export logic, allow export empty file.