Can you make the signature as follows:
getTraceFileName(long superstepNo, DebugTrace debugTrace, String optVertexId)
Basically swap debugTrace and vertexId and then rename vertexId to optVertexId?