Most of the time, just saying "it doesn't work" doesn't provide any information to let people help you. Describe the problem, e.g. any errors or output.
Since you just prompt the user for a string, most likely you num argument. Maybe the file got moved?