added safeName for windows directory