Supports more mainfiles