Added logic to check that arguments are provided