del old file + rm unused variable from function