Fixing bug where the static resource handler held on to file lock