added check to delete empty database archive if it exists