modified directory creation for logs