remove set_file file duplicat and use the one in misc instead
remove dead code