detect yaml extension and use it if exists