Add some more unittests and do checking for valid input file