Fixed NullPointer in checkFilePath()
Removed unused code, version 1046.