Some error checking and a readme file