fixed the block_order method and insert orders with the right block to delete tmp files