Added better error handling messages.