remove unnecessary global keywords, open pkl and log in script dir
log all events, parseAndWrite only on song change, added "Logging in..." message