added writing directory