File does not exist is caught on require, but the invalid file is caught is when the configModule is first used (line 225). At that point the whole error is reported, in case of SyntaxError line number is displayed as well.