My guess would be you're using relative paths and when the current working directory is set to something else than you expect, you app fails to find files.