Fixed file lock on image preview