Bug fix where filename returns nil and breaks script