Adding Back up dir option and code clean up