Updated logic to add missing file if needed

close #2, Updates to make compatible with mac.