I am creating a PDF generation program. One feature is to merge all pdfs and delete all the pieces after. I have it working perfectly until I changed the path to the pdfs. Here is the function:

```
def pdf_cleanup(name):
    files_dir = '/root/PycharmProjects/ReportApp/FML/Pdf_Docs'

    xx = [f for f in os.listdir(files_dir) if f.endswith("pdf")]

    for f in xx:
        if f.startswith(name):
            pass
        else:
            os.remove(f)
    return

```

Looking at the `files_dir` variable if I set it back one directory - so it looks like this `files_dir = '/root/PycharmProjects/ReportApp/FML'` Than it works fine. When I try to use it in the Pdf\_Docs directory I error out saying that 'name\_of\_pdf' does not exist, when it does.

Traceback:

```
/usr/bin/python3.5 /root/PycharmProjects/ReportApp/FML/dump.py
Traceback (most recent call last):
  File "/root/PycharmProjects/ReportApp/FML/dump.py", line 16, in <module>
    pdf_cleanup('mer')
  File "/root/PycharmProjects/ReportApp/FML/dump.py", line 13, in pdf_cleanup
    os.remove(f)
FileNotFoundError: [Errno 2] No such file or directory: 'Main_Calls.pdf'

Process finished with exit code 1 

```

Is there something stupid and small I am overlooking?? I don't understand why changing one folder breaks it.