__FILE__ is deprecated, we should use __DIR__ or __ENV__.file instead

This replaces all occurrences of __FILE__ in the code to avoid this warning message:

``__FILE__ is deprecated, please use __DIR__ or __ENV__.file instead``