Added max.attempts and tryCatch() to NOMAD