Fix array check and add type debug output
Merge with github
Merge typechecker again
Fix segfault for input files in same dir as executable