tolerate __dirname __filename