fix #79
added overwrite flags, fix #80