I think you are not understanding what I mean, the working directory is just the directory you are currently working on, you just have to be aware of it so you can define file paths (to any file you are using in your code) that take it into account.
As I said, you are not providing enough information for us to be able to help you, please ask your question providing a reproducible example as explained on the link I gave you before or at least provide a concrete example of the code that gives you those errors messages.