Modified the order of DB upload