fixed a problem where a missing file causes a stack to be written