* outsource function to get idl for append mode * Expose option to define function for idl by the user. * clean up args * add tests * lint