Added unit tests for everything works ok and output file already exists.