incrementing version, ignoring some unnecessary files
Better error reporting for invalid images