added path for err != nil and err not being IsNotExist