Logging errors, removed unneccessary console logs