refactor: using require error code to distinguish file not found