add file header
better error handling
better error handling
update smash