Added logging

logs output to a file in the same folder as the script with the date in
the filename