Added error checking to dockerSock. Closes #2