added method to write to applog collection