Added lines to check for encoded semicolons in uris
added logs to db calls
fixed typo in environment variable name