Fixing errors in logging endpoint