Malefique (2002)
Four prisoners find an ancient diary in the wall of their cell which might be the key to getting out