Added number of arguments check and error output.