Changed logic behind logToShakespeare() function, split into two functions for logging notices and errors. Added some custom error codes