also removed the check for true-ness against file as I did not find it relevant