No need to check if filename != nil - it will always be.