Support for different activities + code improvements + output file written on a file for further use