Modified the average file creation to use ddplr function