Added logger.py and more functions to lib.py