Updated function arguments

Updated function arguments to include corr.errors = NULL
Added stop if y model is not found