Improved open functionality to handle invalid files and renamed definition file to use extension