Introduced check function
Added install script for alps on Mac OS X