updated script for linux, validation for local_profile