Added exception to ruby script