Improved logging

Now all errors are nicely labeled and logged to console and client.log