Handle occasional locked file error