Hopefully fixed Noah's errors in using fs functions