Added fix for scenarios when __file__ is empty.