Method for coating a substrate and coater