this rake task seems to work
file mode correction