Fixed some Compiler Warnings
Changed the logic of dynamic fsync