filename can be null