Updated error logging function to support multiple arguements.