added error msg logged to console and future TODO to add more detailed error exceptions