fixed create directory and write to file