My working version

Still some testing to do, but it should work
Logging to file
Removed pycs
Added logging

And removed pycs