Update file.py

Change the rfa check to the condition