You're setting -f above conditionally