Split file parser / validator into separate class.