Stop the program when -merge-layers fails