Add back api compatability

Also adds logging for deprecation warning.