updated readme and added some more validation in the code for validating the source file