if f_in == f_out then don't close one of them