Improve testing and file define