Added general function to add filename and motif name