fix syntax
fix fileformat
fix wrong file detection