Added some new conditions and test code for some files