minor tweak to log function
minor tweak to connect function
Made logging optional. Fixed bug in getAll