file format check
glue logic
fixes