Add missing `then` to environment file check