Added checks for -access, and fixed a bug in add_meta_data