turn creation of info dir into separate function