fix to broken javac generic compilation + some more IO simplification