use echo instead of trigger_error() to make sure the error will be displayed. closes #124.