change sampling from service to singleton module
clean database only after data upload success