Fix how calling file is determined