style fix: use with with open, os.path.join for pathes
added docstring