Added checks to file