modified to use currentMSecsSinceEpoch() in randomString() function.
trimmed white spaces of end of line.
Added logics of checking the number of parameters strictly.