function for writing manifest file
tidying code

Signed-off-by: Gabriel Andrade <gabriel@b-datum.com>