added check/creation of txt file