Bugfixed and added status messages throughout the script