Add error message for `avg` command and correctly changed to parseFloat from parseInt.