add error messages + file loader improvement