Finished connection tests. Added logging functionality