Detect if called through require or directly by command line