It seems incorrected.

$filePath has not been declared anywhere.