Fixed reachedMaximumPlugins and added close for FileInputStream
Stuff