create directory, file and apply file to created directory