Fail more gracefully when computing regressors
Cleaned file reader and added validity check