Do not use die() and perror(); switch to error()

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>