added File variable instead of fileName and filePath