check if data and logs directories exist before trying to delete them