Added more checks
Changed greader.js