Please specify exact exception classes. And also, don't use ' "%s/%s" % ', use "/".join()