fixed call stat bug
added test files