Reading locked files by coping into temp file