fixed reset of loop variable
updated fileHandler some more