added auto directory creation