Add error checking for file type
Implement folder processing for test code